package xyz.zyl2020.java8.function;

import java.util.function.Supplier;

/**
 * @author ZhuYinglong
 * @date 2020/10/11 0011
 */
public class SupplierDemo {

    public static void main(String[] args) {
        supplierDemo1();
        supplierDemo2(() -> 1024);
    }

    static void supplierDemo1() {
        Supplier<Integer> supplier = () -> 1024;
        System.out.println("supplierDemo1 --> " + supplier.get());
    }

    static void supplierDemo2(Supplier<Integer> supplier) {
        System.out.println("supplierDemo2 --> " + supplier.get());
    }

    ;
}
